package com.bootdo.kaoqin.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.kaoqin.dao.KaoqinUserDao;
import com.bootdo.kaoqin.domain.KaoqinUser;
import com.bootdo.kaoqin.service.KaoqinUserService;



@Service
public class KaoqinUserServiceImpl implements KaoqinUserService {
	@Autowired
	private KaoqinUserDao kaoqinUserDao;
	
	@Override
	public KaoqinUser get(Long id){
		return kaoqinUserDao.get(id);
	}
	
	@Override
	public List<KaoqinUser> list(Map<String, Object> map){
		return kaoqinUserDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return kaoqinUserDao.count(map);
	}
	
	@Override
	public int save(KaoqinUser kaoqinUser){
	
		if(kaoqinUser.getId() != null) {
			return kaoqinUserDao.update(kaoqinUser);
		}else {
			return kaoqinUserDao.save(kaoqinUser);
		}		
	
		
	}
	
	@Override
	public int update(KaoqinUser kaoqinUser){
		return kaoqinUserDao.update(kaoqinUser);
	}
	
	@Override
	public int remove(Long id){
		return kaoqinUserDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return kaoqinUserDao.batchRemove(ids);
	}
	
}
